package com.guigu.eduservice.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.guigu.eduservice.entity.ArticleCategory;
import com.guigu.eduservice.mapper.ArticleCategoryMapper;
import com.guigu.eduservice.service.ArticleCategoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 文章分类表（用于管理平台资讯文章的分类） 服务实现类
 * </p>
 *
 * @author janecraft
 * @since 2025-09-27
 */
@Service
public class ArticleCategoryServiceImpl extends ServiceImpl<ArticleCategoryMapper, ArticleCategory> implements ArticleCategoryService {

    @Autowired
    private ArticleCategoryService articleCategoryService;
    //文章分类分页
    @Override
    public PageInfo<ArticleCategory> getArticleCategoryPage(Integer PageSize, Integer PageNo) {
        PageHelper.startPage(PageNo,PageSize);
        List<ArticleCategory> list = articleCategoryService.list();
        PageInfo<ArticleCategory> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }
}
